﻿using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;

namespace Fadada.FASC.SDK.DotNetCore.Model
{
    public class Notification
    {
        /// <summary>
        /// 是否需要法大大平台发送通知：
        /// false: 不通知
        /// true: 通知
        /// 如果是通知，则必须填写以下通知方式。
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "sendNotification",
            Required = Newtonsoft.Json.Required.Always)]
        public bool SendNotification { get; set; }

        /// <summary>
        /// 通知方式：
        /// mobile: 手机
        /// email: 邮箱。
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "notifyWay",
            Required = Newtonsoft.Json.Required.AllowNull)]
        public string NotifyWay { get; set; }

        /// <summary>
        /// 通知地址，手机号或邮箱地址，和通知方式匹配一致，
        /// 长度最大100个字符。
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "notifyAddress",
            Required = Newtonsoft.Json.Required.AllowNull)]
        [MaxLength(100)]
        public string NotifyAddress { get; set; }
    }
}